#include <iostream>
#include <string>

using namespace std;

class Human
{
    private:
        string name;
        int age;
        char* nickname;

    public:
        Human(string HumanName, int HumanAge):name(HumanName), age(HumanAge){
            cout << "welcome! " << name << endl;
        }

        Human(const char* yourname){
            nickname = new char [strlen(yourname)+1];
            strcpy(nickname, yourname);
                    }
        string sex;

        // deep copy
        Human(const Human& source){
            nickname = new char [strlen(nickname)+1];
            strcpy(nickname, source.nickname);
        }

        void SetName(string HumanName){
            name = HumanName;
        }
        void SetAge(int HumanAge){
            age = HumanAge;
        }
        
        int GetAge(){
            if (age > 30)
                return (age - 3);
            else
                return (age);
        }

        void Introduce(){
            cout << "I am " << name << ", " << "or you can call me " << nickname
        << ", I am " << age << " years old" << endl;
        }
};


